package com.social.util;

import lombok.*;

@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
/**
 * 返回前端数据工具类
 */
public class JsonUtil {
    //200 404  500 400
    private String code;
    //success  error
    private String status;
    //结果集
    private Object result;
    //返回状态
    private Boolean restate;

    //返回状态方法
    public Boolean getRestates(Integer status) {
        if (status == 1) {
            this.setRestate(true);
        } else {
            this.setRestate(false);
        }
        return getRestate();
    }
}
